<?php
/**
 * Created by PhpStorm.
 * User: evenvi
 * Date: 17-8-19
 * Time: 上午9:24
 */

namespace AppBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;

class LuckyController extends Controller
{


    /**
     * @Route("/number")
     */
    public function numberAction(){
        $number = mt_rand(0, 100);

//        return new Response(
//            '<html><body>Lucky Number: '. $number.'</body></html>'
//        );

        return $this->render('lucky/number.html.twig', array(
            'number'    => $number,
        ));
    }
}